home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-28 | 3.2 KB | 109 lines | [TEXT/CWIE] |
- // ===========================================================================
- // UWindowsUsher.h © 1995, Éric Forget. All rights reserved.
- // ===========================================================================
- //
- // ************************************************************************
- // * *
- // * Before using this code you should read the "License Agreement" *
- // * document and agree with it. *
- // * *
- // ************************************************************************
- //
- // Instruction and usage notes are in the UWindowsUsher.cp file.
- //
- // ---------------------------------------------------------------------------
-
- #pragma once
-
- #include <PP_Prefix.h>
- #include <LAttachment.h>
-
- #ifndef __QUICKDRAW__
- #include <QuickDraw.h>
- #endif
-
-
- class LWindow;
- class LList;
- class LDocument;
-
-
- // ---------------------------------------------------------------------------
- // • Constants
- // ---------------------------------------------------------------------------
-
- const ResIDT Menu_Undefined = -1;
- const CommandT cmd_StackWindows = 30; // A reserved but unused command!
-
-
- // ===========================================================================
- // • UWindowsUsher UWindowsUsher •
- // ===========================================================================
-
- class UWindowsUsher {
-
- public:
- static void Initialize(ResIDT inWindowMenuID = Menu_Undefined);
- static void Dispose();
-
- static void AddWindow(LWindow *inWindow, Boolean inShowIt, LDocument *inDocument = nil);
- static void RemoveWindow(LWindow *inWindow);
- static Int16 GetWindowCount();
-
- static Boolean IsStackEnabled();
-
- static void Stack();
-
- protected:
- // Instance variables...
- static LList *sWindowList;
- static LList *sAttachmentList;
- static ResIDT sWindowMenuID;
- static LCommander *sApplication;
- static LAttachment *sStackAttachment;
-
- // Protected methods...
- static void StackAtPos(Int16 inPos, LWindow *inWindow);
- };
-
-
- // ===========================================================================
- // • LWindowMenuAttachment LWindowMenuAttachment •
- // ===========================================================================
-
- class LWindowMenuAttachment : public LAttachment {
-
- private:
- LWindowMenuAttachment(); // Always need parameters...
-
- public:
- LWindowMenuAttachment(LWindow *inWindow, ResIDT inWindowMenuID, LDocument *inDocument);
- virtual ~LWindowMenuAttachment();
-
- virtual void AttachmentHasBeenRemoved(CommandT inCommand);
- CommandT GetCommand();
-
- protected:
- LWindow *mWindow;
- CommandT mCmdToManage;
- ResIDT mWindowMenuID;
- static Int16 sDecalItem;
- LDocument *mDocument;
-
- virtual void ExecuteSelf(MessageT inMessage, void *ioParam);
- };
-
-
- // ===========================================================================
- // • LStackCmdAttachment LStackCmdAttachment •
- // ===========================================================================
-
- class LStackCmdAttachment : public LAttachment {
-
- protected:
-
- virtual void ExecuteSelf(MessageT inMessage, void *ioParam);
- };
-
-
-